hysop.backend.host.python.operator.solenoidal_projection module¶
- class hysop.backend.host.python.operator.solenoidal_projection.PythonSolenoidalProjection(input_field, output_field, variables, input_field_div=None, output_field_div=None, **kwds)[source]¶
Bases:
SolenoidalProjectionOperatorBase
,OpenClMappable
,HostOperator
Solves solenoidal projection (project a 3d field F such that div(F)=0), using spectral methods.
SolenoidalProjection projects a 3D vector field onto the space of divergence free fields.
- Parameters:
input_field (
Field
) – Field to be projected.output_field (:class:`~hysop.fields.continuous_field.Field) – Solution field.
input_field_div (Field, optional) – Optionally compute input field divergence.
output_field_div (Field, optional) – Optionally compute output field divergence.
variables (dict) – dictionary of fields as keys and topologies as values.
kwds – base class parameters.
- apply(**kwds)¶
Abstract method that should be implemented. Applies this node (operator, computational graph operator…).
- setup(work)[source]¶
Setup temporary buffer that have been requested in get_work_properties(). This function may be used to execute post allocation routines. This sets self.ready flag to True. Once this flag is set one may call ComputationalGraphNode.apply() and ComputationalGraphNode.finalize().
Automatically honour temporary field memory requests.